package com.example.aidocengine.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.aidocengine.pojo.entity.TemplatePlaceholderRules;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TemplatePlaceholderRulesMapper extends BaseMapper<TemplatePlaceholderRules> {
    
    /**
     * 查询所有有效的占位符规则
     */
    List<TemplatePlaceholderRules> selectAllActive();
    
    /**
     * 根据替换类型查询规则
     */
    List<TemplatePlaceholderRules> selectByReplacementType(@Param("replacementType") String replacementType);
    
    /**
     * 根据占位符查询规则
     */
    TemplatePlaceholderRules selectByPlaceholder(@Param("placeholder") String placeholder);
}